package com.schoolComments.mapper;

import com.schoolComments.dto.UserDTO;
import com.schoolComments.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 */
@Repository
public interface UserMapper extends BaseMapper<User> {
    //根据手机号查询用户的用户名
    User selectUsernameByPhone(String phone);
    Integer insertUser(User user);
    List<UserDTO> queryUsersByIds(@Param("ids") Set<String> ids);

    User queryUserById(@Param("userId") Long userId);
}
